<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>层叠特性</title>
<script>
    document.write("<h1>title标签中的JavaScript代码</h1>");
    document.write("<h2>" + document.url + "</h2>");
    document.write("<h2>" + document.URL + "</h2>");
    document.write("<h2>" + document.charaterSet + "</h2>");
    document.write("<h2>" + document.contentType + "</h2>");
</script>
</head>
<body>
    <h1>body代码</h1>
    <input style ="text-align:center;color:red;font-size:20px;border:10px solid blue;"
    onblur="alert(this.value)" type ='text' name="userName" id="userName"value=""/>
    <script>
         document.write("<h1>body结束标签前的JavaScript代码</h1>");
    </script>
</body>
</html>